{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "049d6ece",
   "metadata": {},
   "outputs": [],
   "source": [
    "# This checklist can guide you through your Machine Learning projects. There are eight main steps:\n",
    "#     1. Frame the problem and look at the big picture\n",
    "#     -- 把问题“框起来”：确定你要解决什么\n",
    "#     -- 明确业务目标、成功标准\n",
    "#     -- 确定输入数据、输出形式\n",
    "#     -- 判断这是分类？回归？聚类？推荐？\n",
    "#     -- 定义问题的上下文和约束\n",
    "#     2. Get the data\n",
    "#     3. Explore the data to gain insight.\n",
    "#     4. Prepare the data to better expose the underlying data patterns to Machine Learning algorithms.\n",
    "#     5. Explore many different models and shortlist(xxx) the best ones.\n",
    "#     -- 对很多模型做比较、评估，然后挑出表现最好的几个模型作为“最终候选模型”\n",
    "#     6. Fine-tune your models and combine them into a great solution.\n",
    "#     7. Present your solution\n",
    "#     8. Launch,monitor,and maintain your system.\n",
    "\n",
    "# Obviously, you should feel free to adapt this chechlist to your needs."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "82757808",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Frame the problem and Look at the Big Picture:\n",
    "#     1. Define the objective in business terms.\n",
    "#     2. How will your solution be used?\n",
    "#     3. What are the current solutions/workarounds(if any)?\n",
    "#     4. How should you frame this problem(supervised/unsupervised, online/offline, etc.)?\n",
    "#     5. How should performance be measured?\n",
    "#     6. Is the performance measure aligned with the business objective?\n",
    "#     7. What would be the minimum performance needed to reach the business objective?\n",
    "#     8. What are comparable problems? can you reuse experience or tools?\n",
    "#     -- 与当前问题类似、可以拿来对比、方法上相通的问题\n",
    "#     9. Is human expertise available?\n",
    "#     -- 是否有领域专家（人类专家）可以参与？\n",
    "#     -- 在这个问题上，是否有懂业务、懂工艺、懂流程、懂设备、懂数据的人，可以提供专业判断。\n",
    "#     10. How would you solve the problem manually?\n",
    "#     11. List the assumptions you(or others) have made so far.\n",
    "#     12. Verify assumptions if possible."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2729a74f",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Get the Data\n",
    "# Note: automate as much as possible so you can easily get fresh data.\n",
    "#     1. List the data you need and how much you need.\n",
    "#     2. Find and document where you can get that data.\n",
    "#     3. Check how much space it will take.\n",
    "#     4. Check 法律义务, and get authorization if nessary.\n",
    "#     5. Get access authorizations.\n",
    "#     6. Greate a workspace(with enough storage space).\n",
    "#     7. Get the data\n",
    "#     8. Convert the data to a format you can easily manipulate(without changing the data itself).\n",
    "#     9. Ensure sensitive information is deleted or protected.\n",
    "#     10. Check the size and type of data(time series,sample,geographical,etc.)\n",
    "#     11. Sample a test set, put it aside,and never look at it."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "3251f117",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Explore the Data\n",
    "# Note: try to get insights from a field expert for these steps.\n",
    "#     1. Create a copy of data for exploration(sampling it down to a manageable size if necessary).\n",
    "#     2. Create a Jupyter notebook to keep a record of your data exploration.\n",
    "#     3. Study each attribute and its characteristics:\n",
    "#         Name\n",
    "#         Type(categorical,int/float,bounded/unbounded,text,structured,etc.)\n",
    "#         % of missing values\n",
    "#         Noisiness and type of noise(stochastic,outliers,rounding errors,etc.)\n",
    "#         Usefulness for the task\n",
    "#         Type of distribution(Gaussian,uniform,logarithmic,etc.)\n",
    "#     4. For supervised learning task,identity the target attribute(s).\n",
    "#     5. Visualize the data.\n",
    "#     6. Study the correlations between attributes.\n",
    "#     7. Study how you would solve the problem manually.\n",
    "#     8. Identify the promising transformations you may want to apply.\n",
    "#     9. Identify extra data that would be useful.\n",
    "#     10. Document what you have learned."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "1e1d84e9",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Prepare the Data\n",
    "# Notes:\n",
    "#     Work on copies of data(keep the original dataset intact)\n",
    "#     Write functions for all data transformations you apply,for five reasons:\n",
    "#         So you can easily prepare the data the next time you get a fresh dataset.\n",
    "#         So you can apply these transformations in future projects.\n",
    "#         To clean and prepare the test set.\n",
    "#         To clean and prepare new data instances once your solution is live\n",
    "#         To make it easy to treat your preparation choices as hyperparameters.\n",
    "    \n",
    "#     1. Data cleaning:\n",
    "#         Fix or remove outliers(optional).\n",
    "#         Fill in missing values(e.g., with zero,mean,median ..) or drop their rows(or columns).\n",
    "#     2. Feature selection(optional):\n",
    "#         Drop the attributes that provide no useful infomation for the task\n",
    "#     3. Feature engineering, where appropriate:\n",
    "#         Discretize continuous features.\n",
    "#         -- 把连续变量转成离散变量（分箱）\n",
    "#         Decompose features(e.g.,categorical, date/time,etc.)\n",
    "#         -- 把一个复杂得特征拆分成多个更有用、更细粒度得特征\n",
    "#         Add promising transformations of features(e.g., log(x),sqrt(x),x2,etc.)\n",
    "#         -- 对模型性能有潜在提升得特征变换方式 or 值得一试得特征变换\n",
    "#         Aggregate features into promising new features.\n",
    "#         -- 把多个原始特征汇总、聚合，生成新得特征\n",
    "#     4. Feature scaling\n",
    "#         Standardize or normalize features."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a9677cdf",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Shortlist Promising Models\n",
    "# Note:\n",
    "#     If the data is huge, you may want to sample smaller training set so you can train many different models\n",
    "#     in a reasonable time(be aware that this penalizes/惩罚 complex models such as large neural nets or Random\n",
    "#     Forests).\n",
    "#     -- 这里说的“惩罚”通常指：\n",
    "#         由于正则化\n",
    "#         或模型选择指标（例如 AIC BIC 交叉验证偏好简单模型）\n",
    "#         或复杂模型更容易拟合\n",
    "#     因此在评估时会让复杂模型得分更低\n",
    "...."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.20"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
